package com.hc.dao;

import com.hc.entity.Role;
import java.util.List;

public interface RoleDao {

    int insertRole(Role role);

    int insertRoleSelective(Role role);

	int batchInsertRole(List<Role> roleList);

    int deleteRoleById(Integer id);

	int deleteRoleByCondition(Role role);

	int batchDeleteRoleByIdList(List<Integer> idList);

    int updateRole(Role role);

    int updateRoleSelective(Role role);

    long selectCount();
    
    long selectCountByCondition(Role role);

    Role selectRoleById(Integer id);

    List<Role> selectAllRole();

	List<Role> selectRoleByCondition(Role role);

    //////////////////////////// 外键相关 /////////////////////////////////////
    List<Role> selectRoleByParent(Integer parent);

    /**
     * 查找指定Role的父Role
     * @param id
     * @return
     */
    Role selectParentRoleByChildId(Integer id);
}